package GUILayer;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Frame;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.Box;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

import java.awt.Component;
import javax.swing.border.SoftBevelBorder;
import javax.swing.border.BevelBorder;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;
import javax.swing.JButton;

import CtrLayer.SchemeCtr;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;

public class LabScheme extends JFrame {

	private JPanel contentPane;
	private JTextField t11;
	private JTextField t12;
	private JTextField t13;
	private JTextField t14;
	private JTextField t15;
	private JTextField t16;
	private JTextField t17;
	private JTextField t18;
	private JTextField t19;
	private JTextField t110;
	private JTextField t111;
	private JTextField t112;
	private JTextField t113;
	private JTextField t114;
	private JTextField t115;
	private JTextField t116;
	private JTextField t117;
	private JTextField t118;
	private JTextField t21;
	private JTextField t22;
	private JTextField t23;
	private JTextField t24;
	private JTextField t25;
	private JTextField t26;
	private JTextField t27;
	private JTextField t28;
	private JTextField t29;
	private JTextField t210;
	private JTextField t211;
	private JTextField t212;
	private JTextField t213;
	private JTextField t214;
	private JTextField t215;
	private JTextField t216;
	private JTextField t217;
	private JTextField t218;
	private JTextField t31;
	private JTextField t32;
	private JTextField t33;
	private JTextField t34;
	private JTextField t35;
	private JTextField t36;
	private JTextField t37;
	private JTextField t38;
	private JTextField t39;
	private JTextField t310;
	private JTextField t311;
	private JTextField t312;
	private JTextField t313;
	private JTextField t314;
	private JTextField t315;
	private JTextField t316;
	private JTextField t317;
	private JTextField t318;
	private JLabel lblNormalvaerdi;
	private JLabel lblMmoll;
	private JLabel lblXl;
	private JLabel lblXl_1;
	private JLabel lblXL;
	private JLabel lblx;
	private JLabel lblMmoll_1;
	private JLabel lblx_1;
	private JLabel lblMmoll_2;
	private JLabel lblMmoll_3;
	private JLabel lblMmoll_4;
	private JLabel lblMmoll_5;
	private JLabel lblmmoll;
	private JLabel lblGl;
	private JLabel label_15;
	private JTextField t119;
	private JTextField t219;
	private JTextField t319;
	private JButton button_1;
	private JButton btnNewButton_1;
	private JButton btnNewButton_2;
	private JLabel lblNewLabel;
	private JTextField nameField;
	private SchemeCtr schemeCtr;

	/**
	 * Create the frame.
	 * @param model 
	 * @param container 
	 * 
	 * @param lblNewLabel2
	 */
	public LabScheme(final JLabel mainFrameLabel, final DefaultTableModel model) {
		setTitle("Create Laboratory Schema");

		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (ClassNotFoundException e) {
		} catch (InstantiationException e) {
		} catch (IllegalAccessException e) {
		} catch (UnsupportedLookAndFeelException e) {
		}
		
		setBounds(100, 100, 650, 787);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		
		setLocationRelativeTo(null);
		try {
	       
	        setIconImage(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("b4/advancedgui/menu/resources/green_arrow_right.png")));
	    } catch (Exception ex) {
	        Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
	       
	    }
		setExtendedState(Frame.MAXIMIZED_BOTH);

		schemeCtr = new SchemeCtr();

		JLabel lblNewLabel_1 = new JLabel("Hemoglobin(Fe)Stofk");
		lblNewLabel_1.setBounds(66, 60, 153, 14);
		contentPane.add(lblNewLabel_1);

		JLabel lblNewLabel_2 = new JLabel("Leukocytter,park");
		lblNewLabel_2.setBounds(77, 96, 153, 14);
		contentPane.add(lblNewLabel_2);

		JLabel lblNewLabel_3 = new JLabel("Thrombocytter,park");
		lblNewLabel_3.setBounds(66, 129, 153, 14);
		contentPane.add(lblNewLabel_3);

		t11 = new JTextField();
		t11.setBounds(209, 57, 86, 20);
		contentPane.add(t11);
		t11.setColumns(10);

		t12 = new JTextField();
		t12.setBounds(209, 93, 86, 20);
		contentPane.add(t12);
		t12.setColumns(10);

		t13 = new JTextField();
		t13.setBounds(209, 126, 86, 20);
		contentPane.add(t13);
		t13.setColumns(10);

		JLabel lblNewLabel_4 = new JLabel("Koagulationsfaktorer II,IV,X");
		lblNewLabel_4.setBounds(30, 166, 200, 14);
		contentPane.add(lblNewLabel_4);

		JLabel lblNewLabel_5 = new JLabel("Syre-base-status(Arterielt bold)");
		lblNewLabel_5.setBounds(20, 202, 188, 14);
		contentPane.add(lblNewLabel_5);

		JLabel lblNewLabel_6 = new JLabel("pH(37 gC)");
		lblNewLabel_6.setBounds(113, 237, 86, 14);
		contentPane.add(lblNewLabel_6);

		t14 = new JTextField();
		t14.setBounds(209, 163, 86, 20);
		contentPane.add(t14);
		t14.setColumns(10);

		t15 = new JTextField();
		t15.setBounds(209, 199, 86, 20);
		contentPane.add(t15);
		t15.setColumns(10);

		t16 = new JTextField();
		t16.setBounds(209, 234, 86, 20);
		contentPane.add(t16);
		t16.setColumns(10);

		JLabel lblNewLabel_7 = new JLabel("Base-excess,stofk");
		lblNewLabel_7.setBounds(80, 270, 139, 14);
		contentPane.add(lblNewLabel_7);

		t17 = new JTextField();
		t17.setBounds(209, 267, 86, 20);
		contentPane.add(t17);
		t17.setColumns(10);

		JLabel lblNewLabel_8 = new JLabel("Oxygen,saturation");
		lblNewLabel_8.setBounds(79, 307, 129, 14);
		contentPane.add(lblNewLabel_8);

		t18 = new JTextField();
		t18.setBounds(209, 304, 86, 20);
		contentPane.add(t18);
		t18.setColumns(10);

		JLabel lblNewLabel_9 = new JLabel("Hydrogencarbonation");
		lblNewLabel_9.setBounds(59, 342, 160, 14);
		contentPane.add(lblNewLabel_9);

		t19 = new JTextField();
		t19.setBounds(209, 339, 86, 20);
		contentPane.add(t19);
		t19.setColumns(10);

		JLabel lblNewLabel_10 = new JLabel("Kalium-ion,stofk");
		lblNewLabel_10.setBounds(90, 373, 117, 14);
		contentPane.add(lblNewLabel_10);

		t110 = new JTextField();
		t110.setBounds(209, 370, 86, 20);
		contentPane.add(t110);
		t110.setColumns(10);

		JLabel lblNewLabel_11 = new JLabel("Natrium-ion,stofk");
		lblNewLabel_11.setBounds(77, 407, 129, 14);
		contentPane.add(lblNewLabel_11);

		t111 = new JTextField();
		t111.setBounds(209, 404, 86, 20);
		contentPane.add(t111);
		t111.setColumns(10);

		JLabel lblNewLabel_12 = new JLabel("Creatininium,stofk");
		lblNewLabel_12.setBounds(77, 443, 117, 14);
		contentPane.add(lblNewLabel_12);

		t112 = new JTextField();
		t112.setBounds(209, 440, 86, 20);
		contentPane.add(t112);
		t112.setColumns(10);

		JLabel lblNewLabel_13 = new JLabel("Carbamid,stofk");
		lblNewLabel_13.setBounds(88, 474, 120, 14);
		contentPane.add(lblNewLabel_13);

		t113 = new JTextField();
		t113.setBounds(209, 471, 86, 20);
		contentPane.add(t113);
		t113.setColumns(10);

		JLabel lblNewLabel_14 = new JLabel("Albumin,massek");
		lblNewLabel_14.setBounds(80, 507, 129, 14);
		contentPane.add(lblNewLabel_14);

		t114 = new JTextField();
		t114.setBounds(209, 504, 86, 20);
		contentPane.add(t114);
		t114.setColumns(10);

		JLabel lblNewLabel_15 = new JLabel("C Reaktivt Protein,massek");
		lblNewLabel_15.setBounds(34, 539, 174, 14);
		contentPane.add(lblNewLabel_15);

		t115 = new JTextField();
		t115.setBounds(209, 533, 86, 20);
		contentPane.add(t115);
		t115.setColumns(10);

		JLabel lblNewLabel_17 = new JLabel("Glucose kl 06.00, stofk");
		lblNewLabel_17.setBounds(59, 570, 154, 14);
		contentPane.add(lblNewLabel_17);

		t116 = new JTextField();
		t116.setBounds(209, 567, 86, 20);
		contentPane.add(t116);
		t116.setColumns(10);

		JLabel lblNewLabel_18 = new JLabel("Glucose kl 12.00,stofk");
		lblNewLabel_18.setBounds(59, 601, 129, 14);
		contentPane.add(lblNewLabel_18);

		t117 = new JTextField();
		t117.setBounds(209, 598, 86, 20);
		contentPane.add(t117);
		t117.setColumns(10);

		JLabel lblNewLabel_19 = new JLabel("Glucose kl 17.30,stofk");
		lblNewLabel_19.setBounds(59, 626, 141, 14);
		contentPane.add(lblNewLabel_19);

		t118 = new JTextField();
		t118.setBounds(209, 629, 86, 20);
		contentPane.add(t118);
		t118.setColumns(10);

		t21 = new JTextField();
		t21.setBounds(307, 57, 86, 20);
		contentPane.add(t21);
		t21.setColumns(10);

		t22 = new JTextField();
		t22.setBounds(307, 93, 86, 20);
		contentPane.add(t22);
		t22.setColumns(10);

		t23 = new JTextField();
		t23.setBounds(307, 126, 86, 20);
		contentPane.add(t23);
		t23.setColumns(10);

		t24 = new JTextField();
		t24.setBounds(307, 163, 86, 20);
		contentPane.add(t24);
		t24.setColumns(10);

		t25 = new JTextField();
		t25.setBounds(307, 199, 86, 20);
		contentPane.add(t25);
		t25.setColumns(10);

		t26 = new JTextField();
		t26.setBounds(307, 234, 86, 20);
		contentPane.add(t26);
		t26.setColumns(10);

		t27 = new JTextField();
		t27.setBounds(307, 267, 86, 20);
		contentPane.add(t27);
		t27.setColumns(10);

		t28 = new JTextField();
		t28.setBounds(307, 304, 86, 20);
		contentPane.add(t28);
		t28.setColumns(10);

		t29 = new JTextField();
		t29.setBounds(307, 339, 86, 20);
		contentPane.add(t29);
		t29.setColumns(10);

		t210 = new JTextField();
		t210.setBounds(307, 372, 86, 20);
		contentPane.add(t210);
		t210.setColumns(10);

		t211 = new JTextField();
		t211.setBounds(307, 404, 86, 20);
		contentPane.add(t211);
		t211.setColumns(10);

		t212 = new JTextField();
		t212.setBounds(307, 440, 86, 20);
		contentPane.add(t212);
		t212.setColumns(10);

		t213 = new JTextField();
		t213.setBounds(307, 473, 86, 20);
		contentPane.add(t213);
		t213.setColumns(10);

		t214 = new JTextField();
		t214.setBounds(307, 504, 86, 20);
		contentPane.add(t214);
		t214.setColumns(10);

		t215 = new JTextField();
		t215.setBounds(307, 536, 86, 20);
		contentPane.add(t215);
		t215.setColumns(10);

		t216 = new JTextField();
		t216.setBounds(307, 567, 86, 20);
		contentPane.add(t216);
		t216.setColumns(10);

		t217 = new JTextField();
		t217.setBounds(307, 598, 86, 20);
		contentPane.add(t217);
		t217.setColumns(10);

		t218 = new JTextField();
		t218.setBounds(307, 629, 86, 20);
		contentPane.add(t218);
		t218.setColumns(10);

		t31 = new JTextField();
		t31.setColumns(10);
		t31.setBounds(403, 57, 86, 20);
		contentPane.add(t31);

		t32 = new JTextField();
		t32.setColumns(10);
		t32.setBounds(403, 93, 86, 20);
		contentPane.add(t32);

		t33 = new JTextField();
		t33.setColumns(10);
		t33.setBounds(403, 126, 86, 20);
		contentPane.add(t33);

		t34 = new JTextField();
		t34.setColumns(10);
		t34.setBounds(403, 163, 86, 20);
		contentPane.add(t34);

		t35 = new JTextField();
		t35.setColumns(10);
		t35.setBounds(403, 199, 86, 20);
		contentPane.add(t35);

		t36 = new JTextField();
		t36.setColumns(10);
		t36.setBounds(403, 234, 86, 20);
		contentPane.add(t36);

		t37 = new JTextField();
		t37.setColumns(10);
		t37.setBounds(403, 267, 86, 20);
		contentPane.add(t37);

		t38 = new JTextField();
		t38.setColumns(10);
		t38.setBounds(403, 304, 86, 20);
		contentPane.add(t38);

		t39 = new JTextField();
		t39.setColumns(10);
		t39.setBounds(403, 339, 86, 20);
		contentPane.add(t39);

		t310 = new JTextField();
		t310.setColumns(10);
		t310.setBounds(403, 372, 86, 20);
		contentPane.add(t310);

		t311 = new JTextField();
		t311.setColumns(10);
		t311.setBounds(403, 404, 86, 20);
		contentPane.add(t311);

		t312 = new JTextField();
		t312.setColumns(10);
		t312.setBounds(403, 440, 86, 20);
		contentPane.add(t312);

		t313 = new JTextField();
		t313.setColumns(10);
		t313.setBounds(403, 473, 86, 20);
		contentPane.add(t313);

		t314 = new JTextField();
		t314.setColumns(10);
		t314.setBounds(403, 504, 86, 20);
		contentPane.add(t314);

		t315 = new JTextField();
		t315.setColumns(10);
		t315.setBounds(403, 536, 86, 20);
		contentPane.add(t315);

		t316 = new JTextField();
		t316.setColumns(10);
		t316.setBounds(403, 567, 86, 20);
		contentPane.add(t316);

		t317 = new JTextField();
		t317.setColumns(10);
		t317.setBounds(403, 598, 86, 20);
		contentPane.add(t317);

		t318 = new JTextField();
		t318.setColumns(10);
		t318.setBounds(403, 629, 86, 20);
		contentPane.add(t318);

		lblNormalvaerdi = new JLabel("Normalvaerdi");
		lblNormalvaerdi.setBounds(538, 26, 86, 14);
		contentPane.add(lblNormalvaerdi);

		lblMmoll = new JLabel("7,0-10,0 mmol/l");
		lblMmoll.setBounds(512, 60, 112, 14);
		contentPane.add(lblMmoll);

		lblXl = new JLabel("4,5-11.0 x 10)9/l");
		lblXl.setBounds(512, 96, 112, 14);
		contentPane.add(lblXl);

		lblXl_1 = new JLabel("135-400 x 10)9/l");
		lblXl_1.setBounds(512, 129, 157, 14);
		contentPane.add(lblXl_1);

		lblXL = new JLabel("0,7-1,30 x l");
		lblXL.setBounds(512, 166, 112, 14);
		contentPane.add(lblXL);

		lblx = new JLabel("7,36-7,42x1");
		lblx.setBounds(512, 237, 81, 14);
		contentPane.add(lblx);

		lblMmoll_1 = new JLabel("-3-+3 mmol/l");
		lblMmoll_1.setBounds(512, 270, 81, 14);
		contentPane.add(lblMmoll_1);

		lblx_1 = new JLabel("0,93-0,99x1");
		lblx_1.setBounds(507, 304, 86, 14);
		contentPane.add(lblx_1);

		lblMmoll_2 = new JLabel("21-27 mmol/l");
		lblMmoll_2.setBounds(512, 342, 81, 14);
		contentPane.add(lblMmoll_2);

		lblMmoll_3 = new JLabel("3,5-4,6 mmol/l");
		lblMmoll_3.setBounds(512, 375, 81, 14);
		contentPane.add(lblMmoll_3);

		lblMmoll_4 = new JLabel("137-145 mmol/l");
		lblMmoll_4.setBounds(512, 407, 81, 14);
		contentPane.add(lblMmoll_4);

		lblMmoll_5 = new JLabel("45-90 mmol/l");
		lblMmoll_5.setBounds(512, 443, 81, 14);
		contentPane.add(lblMmoll_5);

		lblmmoll = new JLabel("2,6-6,4mmol/l");
		lblmmoll.setBounds(512, 476, 81, 14);
		contentPane.add(lblmmoll);

		lblGl = new JLabel("36-48 g/l");
		lblGl.setBounds(512, 507, 81, 14);
		contentPane.add(lblGl);

		label_15 = new JLabel("<8 mg/l");
		label_15.setBounds(512, 539, 81, 14);
		contentPane.add(label_15);

		JLabel lblGlucoseKlstofk = new JLabel("Glucose kl 21.30,stofk");
		lblGlucoseKlstofk.setBounds(59, 651, 117, 14);
		contentPane.add(lblGlucoseKlstofk);

		t119 = new JTextField();
		t119.setColumns(10);
		t119.setBounds(209, 657, 86, 20);
		contentPane.add(t119);

		t219 = new JTextField();
		t219.setColumns(10);
		t219.setBounds(307, 657, 86, 20);
		contentPane.add(t219);

		t319 = new JTextField();
		t319.setColumns(10);
		t319.setBounds(403, 660, 86, 20);
		contentPane.add(t319);

		Box horizontalBox_1 = Box.createHorizontalBox();
		horizontalBox_1.setBorder(new TitledBorder(null, "",
				TitledBorder.LEADING, TitledBorder.TOP, null, null));
		horizontalBox_1.setBounds(10, 47, 614, 144);
		contentPane.add(horizontalBox_1);

		Box horizontalBox_2 = Box.createHorizontalBox();
		horizontalBox_2.setBorder(new TitledBorder(null, "",
				TitledBorder.LEADING, TitledBorder.TOP, null, null));
		horizontalBox_2.setBounds(10, 190, 614, 174);
		contentPane.add(horizontalBox_2);

		Box horizontalBox_3 = Box.createHorizontalBox();
		horizontalBox_3.setBorder(new TitledBorder(null, "",
				TitledBorder.LEADING, TitledBorder.TOP, null, null));
		horizontalBox_3.setBounds(10, 363, 614, 196);
		contentPane.add(horizontalBox_3);

		button_1 = new JButton("Select Date");
		final JLabel date1 = new JLabel("Date");
		date1.setBounds(195, 32, 76, 14);
		contentPane.add(date1);
		button_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new SessionCalendar(date1);
			}
		});
		button_1.setBounds(195, 6, 100, 25);
		contentPane.add(button_1);

		btnNewButton_1 = new JButton("Create");

		btnNewButton_1.setBounds(206, 715, 89, 23);
		contentPane.add(btnNewButton_1);

		btnNewButton_2 = new JButton("Clear");
		btnNewButton_2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				t11.setText("");
				t12.setText("");
				t13.setText("");
				t14.setText("");
				t15.setText("");
				t16.setText("");
				t17.setText("");
				t18.setText("");
				t19.setText("");
				t110.setText("");
				t111.setText("");
				t112.setText("");
				t113.setText("");
				t114.setText("");
				t115.setText("");
				t116.setText("");
				t117.setText("");
				t118.setText("");
				t119.setText("");
				t21.setText("");
				t22.setText("");
				t23.setText("");
				t24.setText("");
				t25.setText("");
				t26.setText("");
				t27.setText("");
				t28.setText("");
				t29.setText("");
				t210.setText("");
				t211.setText("");
				t212.setText("");
				t213.setText("");
				t214.setText("");
				t215.setText("");
				t216.setText("");
				t217.setText("");
				t218.setText("");
				t219.setText("");
				t31.setText("");
				t32.setText("");
				t33.setText("");
				t34.setText("");
				t35.setText("");
				t36.setText("");
				t37.setText("");
				t38.setText("");
				t39.setText("");
				t310.setText("");
				t311.setText("");
				t312.setText("");
				t313.setText("");
				t314.setText("");
				t315.setText("");
				t316.setText("");
				t317.setText("");
				t318.setText("");
				t319.setText("");

			}
		});
		btnNewButton_2.setBounds(400, 715, 89, 23);
		contentPane.add(btnNewButton_2);

		JButton button = new JButton("Select Date");
		final JLabel date2 = new JLabel("Date");
		date2.setBounds(303, 32, 66, 14);
		contentPane.add(date2);
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new SessionCalendar(date2);
			}
		});
		button.setBounds(293, 6, 100, 25);
		contentPane.add(button);

		JButton button_2 = new JButton("Select Date");
		final JLabel date3 = new JLabel("Date");
		date3.setBounds(403, 32, 86, 14);
		contentPane.add(date3);
		button_2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new SessionCalendar(date3);
			}
		});
		button_2.setBounds(389, 6, 100, 25);
		contentPane.add(button_2);

		Box horizontalBox_4 = Box.createHorizontalBox();
		horizontalBox_4.setBorder(new TitledBorder(null, "Lab Scheme Name",
				TitledBorder.LEADING, TitledBorder.TOP, null, null));
		horizontalBox_4.setBounds(10, 6, 163, 43);
		contentPane.add(horizontalBox_4);

		lblNewLabel = new JLabel("Name");
		horizontalBox_4.add(lblNewLabel);

		nameField = new JTextField();
		horizontalBox_4.add(nameField);
		nameField.setColumns(10);

		final JLabel statusLabel = new JLabel("");
		statusLabel.setBounds(209, 692, 280, 14);
		contentPane.add(statusLabel);

		Box horizontalBox = Box.createHorizontalBox();
		horizontalBox.setBorder(new TitledBorder(null, "",
				TitledBorder.LEADING, TitledBorder.TOP, null, null));
		horizontalBox.setBounds(10, 556, 614, 182);
		contentPane.add(horizontalBox);

		setVisible(true);

		btnNewButton_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {

				try {

					if (date1.getText().equals("Date"))
						statusLabel.setText("Status: Please fill in date and name");
					else
					{
						schemeCtr.createLabScheme(nameField.getText(),
								date1.getText(), t11.getText(), t12.getText(),
								t13.getText(), t14.getText(), t16.getText(),
								t17.getText(), t18.getText(), t19.getText(),
								t110.getText(), t111.getText(), t112.getText(),
								t113.getText(), t114.getText(), t115.getText(),
								t116.getText(), t117.getText(), t118.getText(),
								t119.getText(), t15.getText());
					if (!date2.getText().equals("Date"))
						schemeCtr.createLabScheme(nameField.getText(),
								date2.getText(), t21.getText(), t22.getText(),
								t23.getText(), t24.getText(), t26.getText(),
								t27.getText(), t28.getText(), t29.getText(),
								t210.getText(), t211.getText(), t212.getText(),
								t213.getText(), t214.getText(), t215.getText(),
								t216.getText(), t217.getText(), t218.getText(),
								t219.getText(), t25.getText());
					if (!date2.getText().equals("Date"))
						schemeCtr.createLabScheme(nameField.getText(),
								date3.getText(), t31.getText(), t32.getText(),
								t33.getText(), t34.getText(), t36.getText(),
								t37.getText(), t38.getText(), t39.getText(),
								t310.getText(), t311.getText(), t312.getText(),
								t313.getText(), t314.getText(), t315.getText(),
								t316.getText(), t317.getText(), t318.getText(),
								t319.getText(), t35.getText());


					
					mainFrameLabel.setForeground(new Color(0, 128, 0));
					mainFrameLabel
					.setText("Status: Scheme created successfuly");
					
					 String[] name={nameField.getText()};
					 model.addRow(name);
					model.fireTableDataChanged();
		
				
					
					
					
					dispose();
					}
				}

				catch (Exception ex) {
					statusLabel.setText("Status: Error while creating journal");
				}
			}
		});

	}
}
